#include <iostream>
#include <string>
#include <pthread.h>


void* threadRun(void* args)
{
    std::string name = static_cast<const char*>(args);
    while(true)
    {
        std::cout << name << "is running, tid" << pthread_self() << std::endl;
    }
}


int main()
{
    pthread_t tid;
    pthread_create(&tid, nullptr, threadRun, (void*)"thread-1");

    pthread_join(tid, nullptr);
    return 0;
}